package ch01.Shangji;

import java.lang.reflect.Method;

public class Shangji3 {
    public static void main(String[] args) throws Exception{

        Class cla =  Class.forName("ch01.entity.Person");
        Method age = cla.getDeclaredMethod("getAge");
        age.setAccessible(true);
        System.out.println("age="+age.invoke(null));
    }
}
